Skip to content

BPHNanoAODs #47603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

BPHNanoAODs #47603

wants to merge 45 commits into from

Conversation

gmelachr
Copy link
Contributor

@gmelachr gmelachr commented Mar 15, 2025

The PR is to reopen the PR #47469

Following the presentation in the xPOG meeting (https://indico.cern.ch/event/1509026/#2-bph-custom-nanoaod), this is the PR for the BPH-flavor nanoAODs.

We would like to add this framework as a CMSSW package in order to produce our/BPH NanoAODs centrally by using the Tier0 network.

With the framework we add some tables to the existing NanoAODs tables. In these "BPH" tables we are storing Kshort->ππ, Λ0->pπ candidates and the B->μ+μ-Χ, Χ=Κ+,Κ*0,φ, Κshort, Λ0 candidates and other usefull quantities that are used by many BPH analysis for branching ratio, angular analysis or CPV measurements.

Furthermore, we add tables that can be used for the BPH trigger studies and trigger efficiencies measurement.

FYI: @drkovalskyi @gkaratha @ftorrresd @vlimant @hqucms @makortel

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 15, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47603/44106

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47603/44107

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@gmelachr
Copy link
Contributor Author

gmelachr commented Mar 15, 2025

hello all,

@makortel the bin files were unnecessary so they are not included now in the framework. The remaining comments are work in progress.

The changes proposed by scram build code-checks and scram build code-format have been integrated in the last commit.

A reminder: the cmsDriver command is: cmsDriver.py --conditions 140X_dataRun3_Prompt_v4 --datatier NANOAOD --era Run3,run3_nanoAOD_pre142X --eventcontent NANOAOD --filein root://cms-xrd-global.cern.ch//store/data/Run2024C/ParkingDoubleMuonLowMass0/MINIAOD/PromptReco-v1/000/379/415/00000/b40397b5-61c6-4887-8f4e-025e8ca925ee.root --fileout file:/tmp/gmelachr/BPH_test_data.root --nThreads 4 -n -1 --no_exec --python_filename BPH_test.py --scenario pp --step NANO:@ BPH
(I left on purspose a blank space between @ and the BPH because a user is tagged otherwise)

@ftorrresd
Copy link
Contributor

please test with cms-sw/cms-bot#2487

@ftorrresd
Copy link
Contributor

please abort

@@ -359,6 +365,7 @@ def subnext(self):

# POG/PAG custom NANOs, MC
_wfn.subnext()
workflows[_wfn()] = ['BPHNANOmc140X', ['TTbarMINIAOD14.0', 'BPHNANO_mc14.0']]
Copy link
Contributor

@ftorrresd ftorrresd Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the workflow ids were shift by +1 when the BPHNano workflow was added. This also shift the base x ref comparisons, eg.: EGMNANOmc140X was 2500.222 and now it is 2500.223, so EGMNANOmc140X is being compared with BTVNANOmc140X (the previous 2500.223).

@gmelachr -- can you try to add BPHNANOmc140X at the end of the subnext block?

@@ -370,6 +377,7 @@ def subnext(self):

# POG/PAG custom NANOs, data
_wfn.subnext()
workflows[_wfn()] = ['BPHNANOdata140Xrun3', ['MuonEG2024MINIAOD14.0', 'BPHNANO_data14.0']]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47603/44615

@cmsbuild
Copy link
Contributor

Pull request #47603 was updated. @AdrianoDee, @Moanwar, @cmsbuild, @DickyChant, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen, @miquork, @srimanob, @subirsarkar can you please check and sign again.

@gmelachr
Copy link
Contributor Author

Hi, I updated the PR following @ftorrresd comments. Could someone please request the test command?

@vlimant
Copy link
Contributor

vlimant commented Apr 25, 2025

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-729fbd/45716/summary.html
COMMIT: 299ed73
CMSSW: CMSSW_15_1_X_2025-04-24-2300/el8_amd64_gcc12
Additional Tests: NANO
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47603/45716/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

NANO Comparison Summary

Summary:

  • You potentially removed 698 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 90509
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 90509
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 22 files compared)
  • Checked 113 log files, 65 edm output root files, 23 DQM output files
  • TriggerResults: no differences found

Nano size comparison Summary:

  • Nano ERROR: Missing ref/2500.229-size.json
  • Nano ERROR: Missing ref/2500.229-size.json
  • Nano ERROR: Missing ref/2500.239-size.json
  • Nano ERROR: Missing ref/2500.239-size.json
    | Sample | kb/ev | ref kb/ev | diff kb/ev | ev/s/thd | ref ev/s/thd | diff rate | mem/thd | ref mem/thd |
    | --- | --- | --- | --- | --- | --- | --- | --- | --- |
    | 2500.001 | 3.115 | 3.115 | 0.000 ( +0.0% ) | 5.10 | 5.22 | -2.4% | 2.626 | 2.641 |
    | 2500.002 | 3.231 | 3.231 | 0.000 ( +0.0% ) | 4.63 | 4.58 | +1.0% | 3.102 | 3.099 |
    | 2500.003 | 3.172 | 3.172 | 0.000 ( +0.0% ) | 4.72 | 4.71 | +0.2% | 3.080 | 3.097 |
    | 2500.011 | 1.647 | 1.647 | 0.000 ( +0.0% ) | 8.01 | 9.22 | -13.2% | 2.736 | 2.733 |
    | 2500.012 | 2.185 | 2.185 | 0.000 ( +0.0% ) | 4.85 | 4.97 | -2.4% | 2.930 | 2.934 |
    | 2500.013 | 2.002 | 2.002 | 0.000 ( +0.0% ) | 6.52 | 6.92 | -5.7% | 2.845 | 2.842 |
    | 2500.021 | 0.022 | 0.022 | 0.000 ( +0.0% ) | 1.32 | 1.75 | -24.8% | 2.989 | 2.979 |
    | 2500.022 | 0.022 | 0.022 | 0.000 ( +0.0% ) | 1.19 | 1.68 | -29.2% | 2.982 | 2.982 |
    | 2500.023 | 0.022 | 0.022 | 0.000 ( +0.0% ) | 1.05 | 1.51 | -30.8% | 2.698 | 2.692 |
    | 2500.024 | 0.022 | 0.022 | 0.000 ( +0.0% ) | 0.91 | 1.35 | -32.6% | 3.095 | 3.102 |
    | 2500.031 | 0.035 | 0.035 | 0.000 ( +0.0% ) | 1.10 | 1.51 | -27.6% | 2.917 | 2.925 |
    | 2500.032 | 0.036 | 0.036 | 0.000 ( +0.0% ) | 1.06 | 1.49 | -29.0% | 2.931 | 2.924 |
    | 2500.033 | 0.037 | 0.037 | 0.000 ( +0.0% ) | 1.08 | 1.47 | -26.3% | 2.969 | 2.977 |
    | 2500.034 | 0.036 | 0.036 | 0.000 ( +0.0% ) | 1.07 | 1.46 | -27.1% | 2.964 | 2.956 |
    | 2500.101 | 2.872 | 2.872 | 0.000 ( +0.0% ) | 10.21 | 13.36 | -23.6% | 2.746 | 2.742 |
    | 2500.111 | 1.474 | 1.474 | 0.000 ( +0.0% ) | 19.54 | 27.42 | -28.7% | 2.442 | 2.439 |
    | 2500.112 | 1.896 | 1.896 | 0.000 ( +0.0% ) | 15.97 | 22.20 | -28.1% | 2.511 | 2.515 |
    | 2500.131 | 0.758 | 0.758 | 0.000 ( +0.0% ) | 23.79 | 31.94 | -25.5% | 1.681 | 1.671 |
    | 2500.201 | 2.706 | 2.706 | 0.000 ( +0.0% ) | 9.23 | 10.49 | -12.0% | 2.277 | 2.256 |
    | 2500.211 | 1.845 | 1.845 | 0.000 ( +0.0% ) | 17.12 | 22.16 | -22.7% | 2.546 | 2.542 |
    | 2500.212 | 2.243 | 2.243 | 0.000 ( +0.0% ) | 14.31 | 19.17 | -25.3% | 2.636 | 2.640 |
    | 2500.221 | 2.141 | 2.141 | 0.000 ( +0.0% ) | 8.78 | 12.22 | -28.2% | 2.131 | 2.130 |
    | 2500.222 | 3.516 | 3.516 | 0.000 ( +0.0% ) | 7.55 | 11.62 | -35.0% | 2.225 | 2.227 |
    | 2500.223 | 10.328 | 10.328 | 0.000 ( +0.0% ) | 2.99 | 4.32 | -30.9% | 2.390 | 2.396 |
    | 2500.224 | 6.622 | 6.622 | 0.000 ( +0.0% ) | 0.88 | 0.93 | -5.4% | 2.360 | 2.352 |
    | 2500.225 | 6.671 | 6.671 | 0.000 ( +0.0% ) | 0.86 | 0.85 | +1.5% | 2.580 | 2.547 |
    | 2500.226 | 3.210 | 3.210 | 0.000 ( +0.0% ) | 9.36 | 12.59 | -25.7% | 2.223 | 2.222 |
    | 2500.227 | 1.463 | 1.463 | 0.000 ( +0.0% ) | 11.44 | 12.46 | -8.2% | 1.964 | 1.908 |
    | 2500.228 | 4.075 | 4.075 | 0.000 ( +0.0% ) | 6.42 | 6.07 | +5.8% | 2.520 | 2.426 |
    | 2500.231 | 1.516 | 1.516 | 0.000 ( +0.0% ) | 14.59 | 19.66 | -25.8% | 2.451 | 2.014 |
    | 2500.232 | 2.502 | 2.502 | 0.000 ( +0.0% ) | 12.20 | 18.95 | -35.6% | 2.534 | 2.552 |
    | 2500.233 | 5.422 | 5.422 | 0.000 ( +0.0% ) | 4.37 | 5.36 | -18.5% | 2.703 | 2.698 |
    | 2500.234 | 3.928 | 3.928 | 0.000 ( +0.0% ) | 1.16 | 1.09 | +6.9% | 2.647 | 2.647 |
    | 2500.235 | 3.960 | 3.960 | 0.000 ( +0.0% ) | 1.16 | 1.01 | +14.2% | 2.861 | 2.871 |
    | 2500.236 | 2.292 | 2.292 | 0.000 ( +0.0% ) | 14.71 | 14.61 | +0.6% | 2.545 | 2.530 |
    | 2500.237 | 1.030 | 1.030 | 0.000 ( +0.0% ) | 23.65 | 20.91 | +13.1% | 1.676 | 1.664 |
    | 2500.238 | 2.501 | 2.501 | 0.000 ( +0.0% ) | 11.61 | 10.30 | +12.8% | 2.740 | 2.738 |
    | 2500.241 | 9.404 | 9.404 | 0.000 ( +0.0% ) | 4.65 | 4.46 | +4.5% | 1.968 | 1.965 |
    | 2500.242 | 10.331 | 10.331 | 0.000 ( +0.0% ) | 1.21 | 1.14 | +6.2% | 1.759 | 1.756 |
    | 2500.243 | 2.712 | 2.712 | 0.000 ( +0.0% ) | 11.27 | 11.61 | -3.0% | 1.098 | 1.093 |
    | 2500.244 | 486.016 | 486.016 | 0.000 ( +0.0% ) | 0.92 | 0.75 | +22.2% | 1.718 | 1.719 |
    | 2500.245 | 826.413 | 826.413 | 0.000 ( +0.0% ) | 1.15 | 0.95 | +20.9% | 1.709 | 1.735 |
    | 2500.251 | 645.333 | 645.333 | 0.000 ( +0.0% ) | 1.30 | 1.02 | +26.7% | 1.820 | 1.817 |
    | 2500.301 | 0.021 | 0.021 | 0.000 ( +0.0% ) | 1.30 | 1.13 | +15.3% | 3.131 | 3.119 |
    | 2500.311 | 0.036 | 0.036 | 0.000 ( +0.0% ) | 1.19 | 1.05 | +12.6% | 2.909 | 2.925 |
    | 2500.901 | 1.819 | 1.819 | 0.000 ( +0.0% ) | 23.36 | 21.96 | +6.4% | 1.919 | 1.912 |
    | 2500.902 | 1.665 | 1.665 | 0.000 ( +0.0% ) | 21.63 | 18.96 | +14.1% | 1.495 | 1.495 |
    | 2500.911 | 14.345 | 14.345 | 0.000 ( +0.0% ) | 6.52 | 5.03 | +29.5% | 1.124 | 1.125 |
    | 2500.912 | 0.240 | 0.729 | -0.490 ( -67.1% ) | 3.82 | 2.12 | +80.5% | 0.875 | 0.874 |
    | 2500.913 | 0.110 | 0.110 | 0.000 ( +0.0% ) | 1.75 | 1.49 | +18.1% | 0.885 | 0.880 |

@gmelachr
Copy link
Contributor Author

gmelachr commented Apr 25, 2025

Hi, I see that the fourth column has more zeros now. Does this mean that we are fine now?

@gmelachr
Copy link
Contributor Author

Hi, I see that the fourth column has more zeros now. Does this mean that we are fine now?

if so, the next step is to merge? Could you please inform me before we merge the package in order to have a final look?

Thanks

@ftorrresd
Copy link
Contributor

Hi, I see that the fourth column has more zeros now. Does this mean that we are fine now?

in principle, yes

@ftorrresd
Copy link
Contributor

if so, the next step is to merge? Could you please inform me before we merge the package in order to have a final look?

please, do it.

it is also important to sync the original PR and the backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants